import { View, Image } from '@hips/taro-ui'
import Styles from './app-group.module.less'
import AppFunc from './app-func'
import TabChange from './tab-change'
export default {
  name: 'AppGroup',
  props: {
    data: {
      type: Object,
      default: () => {}
    }
  },
  render() {
    const buildFuncs = () => {
      return (
        <View class={Styles['app-group-funcs']}>
          <View class={Styles['app-group-funcs-title']}>{this.data.name}</View>
          <AppFunc funcs={this.data.funcs}></AppFunc>
        </View>
      )
    }
    const buildMenus = () => {
      return <TabChange menus={this.data.menus}></TabChange>
    }
    return (
      <View class={Styles['app-group']}>
        {buildFuncs()}
        {buildMenus()}
      </View>
    )
  }
}
